import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.io.IOException;
import java.net.URL;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class App {

   @Test
    public void dd() throws IOException {
       URL resource = this.getClass().getClassLoader().getResource("dd.bat");
       String subs=resource.toString().substring(6);
       Process exec = Runtime.getRuntime().exec(subs);
   }



}
